home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / dsetup.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  6.4 KB  |  229 lines

  1. /*==========================================================================
  2.  *
  3.  *  Copyright (C) 1995-1996 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       dsetup.h
  6.  *  Content:    DirectXSetup, error codes and flags
  7.  ***************************************************************************/
  8.  
  9. #ifndef __DSETUP_H__
  10. #define __DSETUP_H__
  11. #pragma option push -b
  12.  
  13. #ifdef _WIN32
  14. #define COM_NO_WINDOWS_H
  15. #include <objbase.h>
  16. #else
  17. #define GUID   void
  18. #define LPGUID LPVOID
  19. #define LPWSTR LPSTR
  20. #define INT    int
  21. #endif
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26.  
  27. //
  28. // Setup Error Codes
  29. //
  30. #define DSETUPERR_BADWINDOWSVERSION     -1
  31. #define DSETUPERR_SOURCEFILENOTFOUND    -2
  32. #define DSETUPERR_BADSOURCESIZE         -3
  33. #define DSETUPERR_BADSOURCETIME         -4
  34. #define DSETUPERR_NOCOPY                -5
  35. #define DSETUPERR_OUTOFDISKSPACE        -6
  36. #define DSETUPERR_CANTFINDINF           -7
  37. #define DSETUPERR_CANTFINDDIR           -8
  38. #define DSETUPERR_INTERNAL              -9
  39. //#define DSETUPERR_NTWITHNO3D          -10  // obsolete, see docs
  40. #define DSETUPERR_UNKNOWNOS             -11
  41. #define DSETUPERR_USERHITCANCEL         -12
  42. #define DSETUPERR_NOTPREINSTALLEDONNT   -13
  43.  
  44.  
  45. //
  46. // String Constants
  47. //
  48. #define MAX_INFLINE             (16*1024)
  49. #define MAX_DESCRIPTION         256
  50.  
  51. //
  52. // DSETUP Flags
  53. //
  54. #define DSETUP_DDRAW            0x00000001      /* install DirectDraw           */
  55. #define DSETUP_DSOUND           0x00000002      /* install DirectSound          */
  56. #define DSETUP_DPLAY            0x00000004      /* install DirectPlay           */
  57. #define DSETUP_DDRAWDRV         0x00000008      /* install DirectDraw Drivers   */
  58. #define DSETUP_DSOUNDDRV        0x00000010      /* install DirectSound Drivers  */
  59. #define DSETUP_DPLAYSP          0x00000020      /* install DirectPlay Providers */
  60. #define DSETUP_DVIDEO           0x00000040      /* install DirectVideo          */
  61.  
  62. #define DSETUP_D3D              0x00000200      /* install Direct3D                                                     */
  63. //
  64. // This flag is obsolete.
  65. // For NT, we now return either 0 for pre installed or
  66. // DSETUPERR_NOTPREINSTALLEDONNT which implies this version of DirectX
  67. // is not installed on this machine.
  68. //
  69. //#define DSETUP_REQUIRESD3D    0x00000400 | DSETUP_D3D /* install Direct3D, pop up dialog box on NT, if no D3D present         */
  70. #define DSETUP_DINPUT           0x00000800      /* install DirectInput                                                     */
  71. #define DSETUP_DIRECTXSETUP     0x00001000      /* install DirectXSetup DLL's   */
  72. #define DSETUP_PROMPTFORDRIVERS 0x10000000      /* prompt when replacing display/audio drivers  */
  73. #define DSETUP_RESTOREDRIVERS   0x20000000      /* restore display/audio drivers  */
  74.  
  75.  
  76. #define DSETUP_DIRECTX          (DSETUP_D3D | DSETUP_DDRAW | DSETUP_DSOUND | \
  77.                                  DSETUP_DPLAY | DSETUP_DINPUT | \
  78.                                  DSETUP_DDRAWDRV | DSETUP_DSOUNDDRV | \
  79.                                  DSETUP_DPLAYSP)
  80.  
  81.  
  82. //
  83. // Data Structures
  84. //
  85. #ifndef UNICODE_ONLY
  86. typedef struct _DIRECTXREGISTERAPPA {
  87.     DWORD    dwSize;
  88.     DWORD    dwFlags;
  89.     LPSTR    lpszApplicationName;
  90.     LPGUID   lpGUID;
  91.     LPSTR    lpszFilename;
  92.     LPSTR    lpszCommandLine;
  93.     LPSTR    lpszPath;
  94.     LPSTR    lpszCurrentDirectory;
  95. } DIRECTXREGISTERAPPA, *PDIRECTXREGISTERAPPA, *LPDIRECTXREGISTERAPPA;
  96. #endif //!UNICODE_ONLY
  97. #ifndef ANSI_ONLY
  98. typedef struct _DIRECTXREGISTERAPPW {
  99.     DWORD    dwSize;
  100.     DWORD    dwFlags;
  101.     LPWSTR   lpszApplicationName;
  102.     LPGUID   lpGUID;
  103.     LPWSTR   lpszFilename;
  104.     LPWSTR   lpszCommandLine;
  105.     LPWSTR   lpszPath;
  106.     LPWSTR   lpszCurrentDirectory;
  107. } DIRECTXREGISTERAPPW, *PDIRECTXREGISTERAPPW, *LPDIRECTXREGISTERAPPW;
  108. #endif //!ANSI_ONLY
  109. #ifdef UNICODE
  110. typedef DIRECTXREGISTERAPPW DIRECTXREGISTERAPP;
  111. typedef PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP;
  112. typedef LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP;
  113. #else
  114. typedef DIRECTXREGISTERAPPA DIRECTXREGISTERAPP;
  115. typedef PDIRECTXREGISTERAPPA PDIRECTXREGISTERAPP;
  116. typedef LPDIRECTXREGISTERAPPA LPDIRECTXREGISTERAPP;
  117. #endif // UNICODE
  118.  
  119.  
  120. //
  121. // API
  122. //
  123. #ifndef UNICODE_ONLY
  124. INT
  125. WINAPI
  126. DirectXSetupA(
  127.     HWND  hWnd,
  128.     LPSTR lpszRootPath,
  129.     DWORD dwFlags
  130.     );
  131. #endif //!UNICODE_ONLY
  132. #ifndef ANSI_ONLY
  133. INT
  134. WINAPI
  135. DirectXSetupW(
  136.     HWND   hWnd,
  137.     LPWSTR lpszRootPath,
  138.     DWORD  dwFlags
  139.     );
  140. #endif //!ANSI_ONLY
  141. #ifdef UNICODE
  142. #define DirectXSetup  DirectXSetupW
  143. #else
  144. #define DirectXSetup  DirectXSetupA
  145. #endif // !UNICODE
  146.  
  147. #ifndef UNICODE_ONLY
  148. INT
  149. WINAPI
  150. DirectXDeviceDriverSetupA(
  151.     HWND  hWnd,
  152.     LPSTR lpszDriverClass,
  153.     LPSTR lpszINFPath,
  154.     LPSTR lpszDriverPath,
  155.     DWORD dwFlags
  156.     );
  157. #endif //!UNICODE_ONLY
  158. #ifndef ANSI_ONLY
  159. INT
  160. WINAPI
  161. DirectXDeviceDriverSetupW(
  162.     HWND   hWnd,
  163.     LPWSTR lpszDriverClass,
  164.     LPWSTR lpszINFPath,
  165.     LPWSTR lpszDriverPath,
  166.     DWORD  dwFlags
  167.     );
  168. #endif //!ANSI_ONLY
  169. #ifdef UNICODE
  170. #define DirectXDeviceDriverSetup  DirectXDeviceDriverSetupW
  171. #else
  172. #define DirectXDeviceDriverSetup  DirectXDeviceDriverSetupA
  173. #endif // !UNICODE
  174.  
  175. #ifndef UNICODE_ONLY
  176. INT
  177. WINAPI
  178. DirectXRegisterApplicationA(
  179.     HWND                  hWnd,
  180.     LPDIRECTXREGISTERAPPA lpDXRegApp
  181.     );
  182. #endif //!UNICODE_ONLY
  183. #ifndef ANSI_ONLY
  184. INT
  185. WINAPI
  186. DirectXRegisterApplicationW(
  187.     HWND                  hWnd,
  188.     LPDIRECTXREGISTERAPPW lpDXRegApp
  189.     );
  190. #endif //!ANSI_ONLY
  191. #ifdef UNICODE
  192. #define DirectXRegisterApplication  DirectXRegisterApplicationW
  193. #else
  194. #define DirectXRegisterApplication  DirectXRegisterApplicationA
  195. #endif // !UNICODE
  196.  
  197. INT
  198. WINAPI
  199. DirectXSetupIsJapan( void );
  200.  
  201. INT
  202. WINAPI
  203. DirectXSetupIsJapanNec( void );
  204.  
  205.  
  206. //
  207. // Function Pointers
  208. //
  209. #ifdef UNICODE
  210. typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD);
  211. typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPWSTR, LPSTR, LPSTR, DWORD);
  212. typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPDIRECTXREGISTERAPPW);
  213. #else
  214. typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPSTR, DWORD);
  215. typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPSTR, LPSTR, LPSTR, DWORD);
  216. typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPDIRECTXREGISTERAPPA);
  217. #endif // UNICODE
  218.  
  219. typedef INT (WINAPI * LPDIRECTXSETUPISJAPAN)(VOID);
  220. typedef INT (WINAPI * LPDIRECTXSETUPISJAPANNEC)(VOID);
  221.  
  222.  
  223. #ifdef __cplusplus
  224. };
  225. #endif
  226.  
  227. #pragma option pop
  228. #endif
  229.